package com.project.service.userService.impl;

import com.project.bean.UserBean;
import com.project.mapper.userMapper.IUserMapper;
import com.project.service.userService.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServicelmpl implements IUserService {
    @Autowired
    private IUserMapper userMapper;

    @Override
    public UserBean login(String userName, String pwd) {
        return userMapper.login(userName, pwd);
    }

    @Override
    public void updateP(int userId, String newPwd) {
        userMapper.updateP(userId, newPwd);
    }

    @Override
    public void updateInfo(int userId, String name, String tel) {
        userMapper.updateInfo(userId,name,tel);
    }

    @Override
    public void add(UserBean user) {
        userMapper.add(user);
    }
}
